import request from '@/utils/request'

// 会员列表
export function memberList(data) {
    return request({
        url: '/system/memberInformation/list',
        method: 'get',
        params: data
    })
}

// 会员列表、会员已下发列表
export function memberSendDataList(data) {
    return request({
        url: '/system/memberInformation/sendDataList',
        method: 'get',
        params: data
    })
}

// 新建会员
export function memberAdd(data) {
    return request({
        url: '/system/memberInformation/insert',
        method: 'post',
        data: data
    })
}

// 编辑会员
export function memberEdit(data) {
    return request({
        url: '/system/memberInformation/update',
        method: 'post',
        data: data
    })
}

// 删除
export function memberDelete(id) {
    return request({
        url: '/system/memberInformation/remove?id=' + id,
        method: 'post'
    })
}

// 获取会员详细信息
export function memberDetail(id) {
    return request({
        url: '/system/memberInformation/selectOne?id=' + id,
        method: 'get'
    })
}

// 审核/反审核
export function memberAudit(data) {
    return request({
        url: '/system/memberInformation/audit',
        method: 'post',
        data: data
    })
}

// 地址列表
export function addressList(data) {
    return request({
        url: '/system/memberAddress/list',
        method: 'get',
        params: data
    })
}

// 地址新建
export function addressAdd(data) {
    return request({
        url: 'system/memberAddress/insert',
        method: 'post',
        data: data
    })
}

// 地址编辑
export function addressUpdate(data) {
    return request({
        url: 'system/memberAddress/update',
        method: 'post',
        data: data
    })
}

// 获取地址详细信息
export function addressDetail(id) {
    return request({
        url: '/system/memberAddress/selectOne?id=' + id,
        method: 'get'
    })
}

// 地址删除
export function addressDel(id) {
    return request({
        url: '/system/memberAddress/deleteById?id=' + id,
        method: 'get'
    })
}